package whf.shop.entity;

import org.apache.struts.upload.FormFile;

import whf.framework.entity.TreeNode;
import whf.framework.file.IFolder;

public class ProductCategory extends whf.framework.entity.AbstractEntity
		implements TreeNode<ProductCategory>, IFolder {

	private static final long serialVersionUID = 0;

	private whf.shop.entity.Shop shop;

	private whf.shop.entity.ProductCategory parent;

	private String imageFile;

	private boolean isMain;

	//
	private FormFile imageFileFile;

	private boolean leaf;

	// ---------- methods ----------

	public void setShop(whf.shop.entity.Shop shop) {
		this.shop = shop;
	}

	public whf.shop.entity.Shop getShop() {
		return this.shop;
	}

	public void setParent(whf.shop.entity.ProductCategory parent) {
		this.parent = parent;
	}

	public whf.shop.entity.ProductCategory getParent() {
		return this.parent;
	}

	/**
	 * @return Returns the leaf.
	 */
	public boolean isLeaf() {
		return leaf;
	}

	/**
	 * @param leaf
	 *            The leaf to set.
	 */
	public void setLeaf(boolean leaf) {
		this.leaf = leaf;
	}

	public void setImageFile(String imageFile) {
		this.imageFile = imageFile;
	}

	public String getImageFile() {
		return this.imageFile;
	}

	public void setMain(boolean isMain) {
		this.isMain = isMain;
	}

	public boolean isMain() {
		return this.isMain;
	}

	/**
	 * @return Returns the imageFileFile.
	 */
	public FormFile getImageFileFile() {
		return imageFileFile;
	}

	/**
	 * @param imageFileFile
	 *            The imageFileFile to set.
	 */
	public void setImageFileFile(FormFile imageFileFile) {
		this.imageFileFile = imageFileFile;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see whf.framework.file.IFolder#getParentFolder()
	 */
	public IFolder getParentFolder() {
		return this.parent;
	}

}